<template>
  <div>
    <button v-on:click="clickCount">You clicked me {{ count }} times.</button>
    <p>{{ name }}</p>
    <p>{{ date }}</p>
  </div>
</template>

<script>
export default {
  name: 'customer',
  props: {
    name: {
      type: String
    }
  },
  data() {
    return {
      count: 0,
      date: Date.now()
    }
  },
  methods: {
    clickCount: function () {
      this.count++;
      this.date = Date.now();
      this.$emit('enlarge-text', this.date)
    }
  }
}

</script>
<style></style>
